<fieldset>
    <legend>条件搜索</legend>
    <form action="{:sysuri()}" autocomplete="off" class="layui-form layui-form-pane form-search" method="get" onsubmit="return false">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">商品编号</label>
            <label class="layui-input-inline">
                <input class="layui-input" name="code" placeholder="请输入商品编号" value="{$get.code|default=''}">
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">商品名称</label>
            <label class="layui-input-inline">
                <input class="layui-input" name="name" placeholder="请输入商品名称" value="{$get.name|default=''}">
            </label>
        </div>

        <!--{notempty name='marks'}-->
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">商品标签</label>
            <label class="layui-input-inline">
                <select class="layui-select" lay-search name="marks">
                    <option value="">-- 全部标签 --</option>
                    {foreach $marks as $mark}{if input('marks','') eq $mark}
                    <option selected value="{$mark}">{$mark}</option>
                    {else}
                    <option value="{$mark}">{$mark}</option>
                    {/if}{/foreach}
                </select>
            </label>
        </div>
        <!--{/notempty}-->

        <!--{notempty name='cates'}-->
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">商品分类</label>
            <div class="layui-input-inline">
                <label class="layui-input-inline">
                    <select class="layui-select" lay-search name="cateids">
                        <option value="">-- 全部分类 --</option>
                        {foreach $cates as $cate}{if input('cateids') eq $cate.id}
                        <option selected value="{$cate.id}">{$cate.spl}{$cate.name|default=''}</option>
                        {else}
                        <option value="{$cate.id}">{$cate.spl}{$cate.name|default=''}</option>
                        {/if}{/foreach}
                    </select>
                </label>
            </div>
        </div>
        <!--{/notempty}-->

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">销售状态</label>
            <label class="layui-input-inline">
                <select class="layui-select" name="status">
                    <option value=''>-- 全部状态 --</option>
                    {foreach ['已下架的商品','销售中的商品'] as $k=>$v}
                    {if input('status','-') eq $k.''}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}{/foreach}
                </select>
            </label>
        </div>

        <!--<div class="layui-form-item layui-inline">
            <label class="layui-form-label">返利状态</label>
            <label class="layui-input-inline">
                <select class="layui-select" name="rebate_type">
                    <option value=''>&#45;&#45; 全部状态 &#45;&#45;</option>
                    {foreach ['非返利的商品','是返利的商品'] as $k=>$v}
                    {if input('rebate_type','-') eq $k.''}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}{/foreach}
                </select>
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">入会礼包</label>
            <label class="layui-input-inline">
                <select class="layui-select" name="vip_entry">
                    <option value=''>&#45;&#45; 全部状态 &#45;&#45;</option>
                    {foreach ['非入会礼包','是入会礼包'] as $k=>$v}
                    {if input('vip_entry','-') eq $k.''}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}{/foreach}
                </select>
            </label>
        </div>-->

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">物流配送</label>
            <label class="layui-input-inline">
                <select class="layui-select" name="truck_type">
                    <option value=''>-- 全部状态 --</option>
                    {foreach ['无需物流配送', '需要物流配送'] as $k=>$v}
                    {if input('truck_type','-') eq $k.''}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}{/foreach}
                </select>
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
        </div>
    </form>
</fieldset>
